import { createClient } from '@supabase/supabase-js'

export const USER_DOCS_BUCKET = 'docs'

const SUPABASE_URL = 'https://dfcosnrcysmhcnynjvrv.supabase.co'
const SUPABASE_ANON_KEY =
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRmY29zbnJjeXNtaGNueW5qdnJ2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgyMDIxOTksImV4cCI6MjAxMzc3ODE5OX0.QzyTKG2sweCqiz0hnTXL1k7iqKX2ffeDw2L96g7G0-8'

export const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
  auth: {
    storage: localStorage,
    autoRefreshToken: true,
    persistSession: true,
    detectSessionInUrl: false,
  },
})
